#ifndef DICE_H
#define DICE_H

#include <QObject>

class Dice : public QObject
{
    Q_OBJECT
public:
    enum Type {D4=4, D6=6, D8=8, D10=10, D12=12, D20=20};

    Dice(Dice::Type size = Dice::D6, QObject *parent = 0);

    Q_INVOKABLE int value() { return _value;}
public slots:
    void roll();

signals:
    void valueChanged(int size);

private:
    Dice::Type _size;
    int _value;

};

#endif // DICE_H
